#include "Includes.h"
uint8_t u8_KeyOld,u8_KeyCurrent,u8_KeyPress=0;
uint8_t  key_process(void)
{
	uint8_t temp0,temp1,temp;
	temp0 = KEY;
	_delay_ms(20);
	temp1 = KEY;
	if(temp1 == temp0)
	{
		return ~temp0;
		/*
		u8_KeyCurrent = temp0;
		if(u8_KeyOld != u8_KeyCurrent)
		{
			u8_KeyOld = u8_KeyCurrent;
			temp = ~(u8_KeyOld&u8_KeyCurrent);
			u8_KeyPress = 1;
			return temp;
		}
		else
		{
			u8_KeyPress = 0;
		}*/
	}
	else
	{
		u8_KeyPress =0;
	}
}
